<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->

<html lang="en" xmlns:th="http://www.thymeleaf.org">


<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta name="description" content="">
	<meta name="author" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
	<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
	<script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
	<script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>

	<title>Dashboard Template for Bootstrap</title>
	<!-- Bootstrap core CSS -->
	<link th:href="@{/webjars/bootstrap/4.0.0/dist/css/bootstrap.min.css}" rel="stylesheet">

	<!-- Custom styles for this template -->
	<link th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">
	<style type="text/css">
		/* Chart.js */

		@-webkit-keyframes chartjs-render-animation {
			from {
				opacity: 0.99
			}
			to {
				opacity: 1
			}
		}

		@keyframes chartjs-render-animation {
			from {
				opacity: 0.99
			}
			to {
				opacity: 1
			}
		}

		.chartjs-render-monitor {
			-webkit-animation: chartjs-render-animation 0.001s;
			animation: chartjs-render-animation 0.001s;
		}
	</style>

</head>

<body>

<!--头部导航栏-->
<div th:replace="~{common/commonFragment::nav-top}"></div><!--用片段替换掉当前的div-->

<div class="container-fluid">
	<div class="row">
		<!--左侧导航栏-->
		<div th:replace="~{common/commonFragment::nav-left(item='emp')}"></div><!--用左侧片段替换当前的div-->


		<main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
			<h2>员工列表</h2>
			<div class="table-responsive">
				<div style="text-align: right;margin: 0px 30px 10px 0px ">

					 <a th:href="@{/emo/toAddEmp}" class="btn btn-sm btn-primary">添加员工</a>
				</div>
				<table class="table table-striped table-sm">
					<thead>
					<tr>
						<th>编号</th>
						<th>姓名</th>
						<th>性别</th>
						<th>生日</th>
						<th>薪资</th>
						<th>部门</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
					</thead>
					<tbody>
					<tr th:each="emp:${empList}" >
						<td th:text="${emp.getEmpno()}" id="lzm"></td>
						<td th:text="${emp.getEname()}"></td>
						<td th:text="${emp.getSex()}"></td>
						<th th:text="${#dates.format(emp.getBirthday(),'yyyy-MM-dd')}"></th>
						<td th:text="${emp.getSalary()}"></td>
						<td th:text="${emp.getDname()}"></td>
						<td th:text="${emp.getEstatus()}"></td>

						<a href="#" data-toggle="tooltip" data-placement="bottom" th:title="${emp.getEmpno()}">鼠标移动到我这</a>
							<!--<a href="#" class="btn btn-sm btn-danger">删除</a>-->
							<a href="#" th:href="@{/emo/toUpdateEmp(empno=${emp.getEmpno()})}" class="btn btn-sm btn-primary">修改</a>
						</input>
					</tr>
					</tbody>
				</table>
			</div>
		</main>
	</div>
</div>



<div class="modal fade" id="reviseCake" role="dialog" aria-labelledby="gridSystemModalLabel">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="gridSystemModalLabel">修改蛋糕</h4>
			</div>
			<div class="modal-body">
				<div class="container-fluid">
					<form class="form-horizontal" id="updatecakeform" >
						<div class="form-group ">
							<label for="sName" class="col-xs-3 control-label">编号：</label>
							<div class="col-xs-8 ">
								<input type="email" class="form-control input-sm duiqi" id="cakeid" placeholder="" name="cakeid"">
							</div>
						</div>
						<div class="form-group">
							<label for="sLink" class="col-xs-3 control-label">名称：</label>
							<div class="col-xs-8 ">
								<input type="" class="form-control input-sm duiqi" id="cName" placeholder="" name="cName">
							</div>
						</div>
						<div class="form-group">
							<label for="sOrd" class="col-xs-3 control-label">价格：</label>
							<div class="col-xs-8">
								<input type="" class="form-control input-sm duiqi" id="cPrice" placeholder="" name="cPrice">
							</div>
						</div>
						<div class="form-group">
							<label for="sKnot" class="col-xs-3 control-label">节日：</label>
							<div class="col-xs-8">
								<input type="" class="form-control input-sm duiqi" id="cFestival" placeholder="" name="cFestival">
							</div>
						</div>
						<div class="form-group">
							<label for="sKnot" class="col-xs-3 control-label">上传图片：</label>
							<div class="col-xs-8">
								<input type="" class="form-control input-sm duiqi" id="cImage" placeholder="" name="cImage">
							</div>
						</div>
						<div class="form-group">
							<label for="sKnot" class="col-xs-3 control-label">库存：</label>
							<div class="col-xs-8">
								<input type="" class="form-control input-sm duiqi" id="amount" placeholder="" name="amount">
							</div>
						</div>
					</form>
				</div>

			</div>
			<div class="modal-footer">
				<form action="UpdateCake">
					<button type="button" class="btn btn-xs btn-white" data-dismiss="modal">取 消</button>
					<button type="button" class="btn btn-xs btn-green" onclick="updateCake()">保 存</button>
				</form>
			</div>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal-dialog -->
</div>


<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" th:src="@{/asserts/js/jquery-3.2.1.slim.min.js}"></script>
<script type="text/javascript" th:src="@{/asserts/js/popper.min.js}" ></script>
<script type="text/javascript" th:src="@{/webjars/bootstrap/4.0.0/dist/css/bootstrap.min.css}" ></script>

<!-- Icons -->
<script type="text/javascript" th:src="@{/asserts/js/feather.min.js}"></script>
<script>
	feather.replace()
</script>

<!-- Graphs -->
<script type="text/javascript" th:src="@{/asserts/js/Chart.min.js}"></script>
<script>
	var ctx = document.getElementById("myChart");
	var myChart = new Chart(ctx, {
		type: 'line',
		data: {
			labels: ["[[#{empsys.sunday}]]", "[[#{empsys.monday}]]", "[[#{empsys.tuesday}]]", "[[#{empsys.wednesday}]]",
				"[[#{empsys.thursday}]]", "[[#{empsys.friday}]]", "[[#{empsys.saturday}]]"],
			datasets: [{
				data: [15339, 21345, 18483, 24003, 23489, 24092, 12034],
				lineTension: 0,
				backgroundColor: 'transparent',
				borderColor: '#007bff',
				borderWidth: 4,
				pointBackgroundColor: '#007bff'
			}]
		},
		options: {
			scales: {
				yAxes: [{
					ticks: {
						beginAtZero: false
					}
				}]
			},
			legend: {
				display: false,
			}
		}
	});
</script>


<script>
	function getoAdd() {
		window.location.href="/empsys/emp/toAddEmp"
	}
</script>

<script>
	$("#myModal").modal("hide");
	function Values(obj){
		alert(obj);
		$("#payNo").val(obj);
	}
</script>

<script>


	$('#reviseCake').on('show.bs.modal', function (event) {
		var a = $(event.relatedTarget)
		var id = button.data('id')
		var modal = $(this)

		modal.find('.modal-title').text('New message to ' + id)

		modal.find('.modal-body input').val(id)
	});

</script>

</body>

</html>